#include "HeroBullet.h"
#include "Constants.h"

using namespace cocos2d;

bool HeroBullet::init() {
	if (!Sprite::init()) {
		return false;
	}

	this->initHeroBullet();
	this->initBody();

	return true;
}

//Hero?
void HeroBullet::initHeroBullet() {
	this->setTexture("Texture/HeroBullet.png");
}

//Hero Bullet
void HeroBullet::initBody() {

	auto size = this->getContentSize();
	auto body = PhysicsBody::createBox(size);
	//??
	body->setTag(ContactTag::HERO_BULLET);
	//?
	body->setContactTestBitmask(0xFFFFFFFF);
	this->setPhysicsBody(body);

}